package cn.tedu.egmvcboot.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@Data
public class UserLoginDTO {
    @ApiModelProperty(value = "用户名",required = true,example = "王克晶")
    @NotBlank(message = "用户名不能为空")//空串和空格
    @Size(min = 1,max = 20,message = "用户名长度必须在1-20位之间")
    private String username;
    @ApiModelProperty(value = "密码",required = true,example = "123456")
    @NotBlank(message = "密码不能为空")//空串和空格
//    @Pattern(regexp = "^[\\u4e00-\\u9fa5a-zA-Z0-9_]{3,15}$",message = "密码只能是中文，字母，数字，下划线，长度在3-15位之间")
    @Size(min = 1,max = 80,message = "密码长度为1-80个字符")
    private String password;
}
